﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class OldClient : System.Web.UI.Page
{
    Connectdbnour con = new Connectdbnour();
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
    {
        if (CheckBox1.Checked == true)
        {
            DropDownList1.Enabled = true;
            DropDownList2.Enabled = true;
            DropDownList3.Enabled = true;
        }
        else
        {
            DropDownList1.Enabled = false;
            DropDownList2.Enabled = false;
            DropDownList3.Enabled = false;
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (CheckBox1.Checked == true)
        {
            GlobalClass.Client = con.oldclientcode(DropDownList1.SelectedItem.ToString(),DropDownList2.SelectedItem.ToString(),DropDownList3.SelectedItem.ToString());
        }
        else
        {
            GlobalClass.Client = TextBox1.Text;
        }
        Response.Redirect("Reception.aspx");
    }
}